<?php if($actElement): ?>

<?php slot('leftbox') ?>
<?php use_stylesheet('/project_css_js/tooted.css') ?>
<?php include_component('headerMenu', 'breadCrumbs') ?>
<div class="leftmainmenu">
	<?php foreach($actElement->getSubElements() as $element): ?>
	<?php if($element->hasChildren()): ?>
		<a href="<?php echo $element->getLink() ?>"><h1 class="mis"><?php echo $element->getName() ?></h1></a>
		<div class="leftmainlinks">
			<ul>
				<?php foreach($element->getSubElements() as $subElement): ?>
				<li class="lmainbox">
					<div class="thumbbox">
						<div class="hiddenthumb">
							<?php
								$pic = $subElement->getParameter('picture_inactive') ? $subElement->getParameter('picture_inactive') : $subElement->getParameter('picture_second');
							?>
							<img src="<?php echo @myPicture::getInstance($pic)->thumbnail(53,38,'center')->url() ?>" width="53" height="38" alt=""/>
						</div>
					</div>
					<div class="thumbover">
						<div class="thumblink">
							<a class="thlink" href="<?php echo $subElement->getLink() ?>"><?php echo $subElement->getName() ?></a>
						</div>
					</div>
					<div class="clear"></div>
				</li>
					<?php if($subElement->hasChildren() && $subElement->isActive()): ?>
					<?php foreach($subElement->getSubElements() as $subSubElement): ?>
						<li class="lmainbox" style="padding-left: 80px">
							<div class="thumbbox" style="margin-left: -80px;">
								<div class="hiddenthumb">
									<img src="<?php echo @myPicture::getInstance($subSubElement->getParameter('picture_inactive'))->thumbnail(53,38,'center')->url() ?>" width="53" height="38" alt=""/>
								</div>
							</div>
							<div class="thumbover">
								<div class="thumblink" >
									<a class="thlink" href="<?php echo $subSubElement->getLink() ?>"><?php echo $subSubElement->getName() ?></a>
								</div>
							</div>
							<div class="clear"></div>
						</li>
					<?php endforeach; ?>
					<?php endif; ?>
				<?php endforeach; ?>
			</ul>
		</div>
	<?php endif; ?>
	<?php endforeach; ?>

<script type="text/javascript">
	$('.lmainbox').hover(function(){
	$(this).find('.hiddenthumb').css('display','block');
	$(this).find('.thumblink').addClass('active');
	$(this).find('.thumbover').addClass('active');
	$('.lmainbox').mouseleave(function(){
	$('.hiddenthumb').css('display','none');
	$('.thumblink').removeClass('active');
	$('.thumbover').removeClass('active');
	});
    });
</script>
</div>
<?php end_slot() ?>

<?php endif; ?>